<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>下单 - 美食订餐系统</title>
    <link rel="stylesheet" href="assets/css/style.css">
    <link rel="stylesheet" href="assets/css/order.css">
</head>
<body>
    <nav class="navbar">
        <div class="nav-container">
            <a href="menu.html" class="nav-logo">美食订餐系统</a>
            <ul class="nav-links">
                <li><a href="menu.html">菜单</a></li>
                <li><a href="order.html" class="active">下单</a></li>
                <li><a href="orders.html">我的订单</a></li>
                <li><a href="#" id="logout-btn">退出</a></li>
            </ul>
        </div>
    </nav>

    <div class="container">
        <h2>创建新订单</h2>
        
        <div class="order-container">
            <div class="order-section">
                <h3>选择菜品</h3>
                <div class="dish-selection">
                    <div class="dish-categories">
                        <button class="category-btn active" data-category="all">全部</button>
                        <!-- 分类将通过JS动态加载 -->
                    </div>
                    
                    <div class="dish-list">
                        <!-- 菜品将通过JS动态加载 -->
                    </div>
                </div>
            </div>
            
            <div class="order-section">
                <h3>已选菜品</h3>
                <div class="selected-items">
                    <table>
                        <thead>
                            <tr>
                                <th>菜品</th>
                                <th>单价</th>
                                <th>数量</th>
                                <th>小计</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody id="selected-items-body">
                            <!-- 已选菜品将通过JS动态加载 -->
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="3">总计</td>
                                <td id="total-amount">¥0.00</td>
                                <td></td>
                            </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
            
            <div class="order-section">
                <h3>配送信息</h3>
                <form id="delivery-form">
                    <div class="form-group">
                        <label for="delivery-address">配送地址</label>
                        <input type="text" id="delivery-address" required>
                    </div>
                    <div class="form-group">
                        <label for="contact-phone">联系电话</label>
                        <input type="tel" id="contact-phone" required>
                    </div>
                    <div class="form-group">
                        <label for="special-notes">特殊要求</label>
                        <textarea id="special-notes" rows="3"></textarea>
                    </div>
                    <button type="submit" class="btn btn-submit">提交订单</button>
                </form>
            </div>
        </div>
    </div>

    <script src="assets/js/api.js"></script>
    <script src="assets/js/auth.js"></script>
    <script src="assets/js/order.js"></script>
</body>
</html>